<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <style>
        .container {
            width: 440px;
            padding: 10px;
            box-sizing: border-box;
            border: 2px solid #123456;
        }

        .tabs {
            width: 420px;
            display: flex;
        }

        .tab-item {
            flex: 1;
            margin: 0 10px;
            height: 50px;
            background-color: pink;
            border-radius: 5px;
            text-align: center;
            line-height: 50px;
            color: #fff;
            font-size: 18px;
        }

        .tabs .tab-active {
            background-color: #123456;
        }

        .content-item {
            margin-top: 20px;
            width: 420px;
            height: 420px;
            background-color: #123456;
            color: #fff;
            font-size: 38px;
            border-radius: 5px;
            text-align: center;
            line-height: 420px;

        }
    </style>
</head>

<body>

    <div id="app" class="container">
        <!-- <h4>{{msg}} </h4> -->
        <div class="tabs">
            <div @click="current=0" class="tab-item" :class=" current==0? 'tab-active' : '' ">Vue</div>
            <div @click="current=1" class="tab-item" :class=" current==1? 'tab-active' : '' ">React</div>
            <div @click="current=2" class="tab-item" :class=" current==2? 'tab-active' : '' ">Angular</div>
        </div>
        <div class="content">
            <div class="content-item" :style="{display:current==0 ? 'block' : 'none' }">Vue单元学习</div>
            <div class="content-item" :style="{display:current==1 ? 'block' : 'none' }">React单元学习</div>
            <div class="content-item" :style="{display:current==2? 'block' : 'none' }">Angular单元学习</div>
        </div>

    </div>


</body>
<script>
    const vm = new Vue({
        data: {
            msg: "6516516516512",
            current: 0
        },


    }).$mount("#app")
</script>

</html>